package edu.zut.cs.software.cms.module.score.dao;


import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import edu.zut.cs.software.cms.base.dao.GenericDao;
import edu.zut.cs.software.cms.module.score.domain.Score;
/**
 * 
 * @author admix
 *
 */

public interface ScoreDao extends GenericDao<Score,Long>{

	@Query(value="  SELECT COUNT(*) FROM `cms`.`t_score` WHERE `id`=?1 ",nativeQuery=true)
	int ifOneExist(@Param("id")long id);
	
	/*
	 * @Query(value =
	 * "UPDATE `cms`.`t_score` SET `identity`='student' WHERE  `ID`=?1"
	 * ,nativeQuery=true)
	 */
	@Query(value="  SELECT * FROM `cms`.`t_score` WHERE `id`=?1 ",nativeQuery=true)
	Score modifyById(@Param("id")long id);
	/*void modifyById(String usual_score,String final_scoreString,String total_score)*/

}
